import { _decorator, Component, Node } from "cc";
const { ccclass, property } = _decorator;

@ccclass("EventSystem")
export class EventSystem extends Component {
    on(type: string, callback: Function, target: Object, useCapture?: boolean){
        this.node.on(type, callback, target, useCapture);
    }

    off(type: string, callback: Function, target: Object, useCapture?: boolean){
        this.node.off(type, callback, target, useCapture);
    }

    offTarget(target: Object) {
        this.node.targetOff(target);
    }
}
